﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Data;
using System.Data.Linq;
using System.Data.Linq.Mapping;
using System.Runtime.Serialization;
using System.Data.Objects.DataClasses;
using System.Xml.Serialization;

namespace EnglishRegister.Entities
{
    [EdmEntityTypeAttribute(Name = "dbo.Course")]
    //[Serializable()]
    //[DataContractAttribute(IsReference = true)]
    public class CourseModel : BaseModel<CourseModel>
    {
        [EdmScalarPropertyAttribute(EntityKeyProperty = true, IsNullable = false)]
        [DataMemberAttribute()]
        public global::System.Guid ID
        {
            get
            {
                return _ID;
            }
            set
            {
                if (_ID != value)
                {
                    _ID = value;
                }
            }
        }
        private global::System.Guid _ID;

        /// <summary>
        /// No Metadata Documentation available.
        /// </summary>
        [EdmScalarPropertyAttribute(EntityKeyProperty = false, IsNullable = true)]
        [DataMemberAttribute()]
        public global::System.String Name
        {
            get
            {
                return _Name;
            }
            set
            {
                _Name = value;
            }
        }
        private global::System.String _Name;

        /// <summary>
        /// No Metadata Documentation available.
        /// </summary>
        [EdmScalarPropertyAttribute(EntityKeyProperty = false, IsNullable = true)]
        [DataMemberAttribute()]
        public Nullable<global::System.Int16> TotalHours
        {
            get
            {
                return _TotalHours;
            }
            set
            {
                _TotalHours = value;
            }
        }
        private Nullable<global::System.Int16> _TotalHours;

        /// <summary>
        /// No Metadata Documentation available.
        /// </summary>
        [EdmScalarPropertyAttribute(EntityKeyProperty = false, IsNullable = true)]
        [DataMemberAttribute()]
        public Nullable<global::System.Int16> Level
        {
            get
            {
                return _Level;
            }
            set
            {
                _Level = value;
            }
        }
        private Nullable<global::System.Int16> _Level;

        /// <summary>
        /// No Metadata Documentation available.
        /// </summary>
        [EdmScalarPropertyAttribute(EntityKeyProperty = false, IsNullable = true)]
        [DataMemberAttribute()]
        public Nullable<global::System.Int32> LimitPeople
        {
            get
            {
                return _LimitPeople;
            }
            set
            {
                _LimitPeople = value;
            }
        }
        private Nullable<global::System.Int32> _LimitPeople;

        /// <summary>
        /// No Metadata Documentation available.
        /// </summary>
        [EdmScalarPropertyAttribute(EntityKeyProperty = false, IsNullable = true)]
        [DataMemberAttribute()]
        public Nullable<global::System.Decimal> Tuition
        {
            get
            {
                return _Tuition;
            }
            set
            {
                _Tuition = value;
            }
        }
        private Nullable<global::System.Decimal> _Tuition;

        /// <summary>
        /// No Metadata Documentation available.
        /// </summary>
        [EdmScalarPropertyAttribute(EntityKeyProperty = false, IsNullable = true)]
        [DataMemberAttribute()]
        public Nullable<global::System.DateTime> StartTime
        {
            get
            {
                return _StartTime;
            }
            set
            {
                _StartTime = value;
            }
        }
        private Nullable<global::System.DateTime> _StartTime;
        /// <summary>
        /// No Metadata Documentation available.
        /// </summary>
        [EdmScalarPropertyAttribute(EntityKeyProperty = false, IsNullable = true)]
        [DataMemberAttribute()]
        public Nullable<global::System.DateTime> EndTime
        {
            get
            {
                return _EndTime;
            }
            set
            {
                _EndTime = value;
            }
        }
        private Nullable<global::System.DateTime> _EndTime;
        /*
        [XmlIgnoreAttribute()]
        [SoapIgnoreAttribute()]
        [DataMemberAttribute()]
        [EdmRelationshipNavigationPropertyAttribute("EnglishCourseModel", "FK_Student_Course", "Student")]
        public EntityCollection<StudentModel> Students
        {
            get
            {
                return ((IEntityWithRelationships)this).RelationshipManager.GetRelatedCollection<StudentModel>("EnglishCourseModel.FK_Student_Course", "Student");
            }
            set
            {
                if ((value != null))
                {
                    ((IEntityWithRelationships)this).RelationshipManager.InitializeRelatedCollection<StudentModel>("EnglishCourseModel.FK_Student_Course", "Student", value);
                }
            }
        }
         */
    }
}
